
x:integer;
y:byte;
i:byte;
z:char;
f:file of char;

begin
   print;
   x:=0;
   open f,"file4.tst";
   for y:=1 to 10 do
   begin
      input i;
      if i=7 then x:=x+1;
      if i=7 then print f,"*";
   end
   close f;

   print;
   open f,"file4.tst";
   for y:=1 to 10 do
       begin
          input f,z;
          print z; z:=" ";
       end
    close f;
    print;
    print "Schet  ";
    print x;
end;